/*
Return the number (count) of vowels in the given string.
We will consider a, e, i, o, and u as vowels for this Kata.
*/

function getCount(str) {
    let vowelsCount = 0;
    const vowels = 'aeiou';
    str = str.toLowerCase();
    for (let i = 0; i < str.length; i++) {
        if (vowels.indexOf(str[i]) > -1) vowelsCount++;
    }
    return vowelsCount;
}


function getCount(str) {
    return (str.match(/[aeiou]/ig) || []).length;
}